<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 转换数组，将数组从一种格式转换为另一种格式
      const arr = ["123", "456", "25", "88"];
      console.log("原数组", arr);
      const r = arr.map(function (v) {
        console.log(v);
        // return { a: v, b: +v };
        // return "$" + v;
        return v + "px";
      });
      console.log("输出", r); // [123, 456, 25, 88]
    </script>
  </body>
</html>
